#pragma once
#include <list>
using namespace std;

#include "CallingData.h"

class Settings {
public:
	Settings();
	~Settings(void);

	void readConfig(const string& filename);
	void writeConfig(const string& filename);
	void readUserInfo(const string& filename);
	void writeUserInfo(const string& filename);

	const CallerList& getCallers() const {
		return m_Callers;
	}
	const CalleeList& getCallees() const {
		return m_Callees;
	}
	static int getMaxProseccNumber() {
		return m_multiProcessN;
	}
	static int getClientTimeOutTime() {
		return m_clientTimeOut;
	}
	static int getCallTimeOutTime() {
		return m_callTimeOut;
	}
	static int maxTotalCallTime() {
		return m_maxTotalCallTime;
	}
	static int maxOneCallTime() {
		return m_maxOneCallTime;
	}
private:
	// available users ,both callers and callees
	CallerList m_Callers;
	CalleeList m_Callees;
	// the max number that it can start skype process at same time.
	static int m_multiProcessN;
	// the time of client no responding
	static int m_clientTimeOut;
	// the time of client no responding started from calling.
	static int m_callTimeOut;
	// the max total call by one user.
	static int m_maxTotalCallTime;
	// the max one calling time.
	static int m_maxOneCallTime;

	static const int s_defaultProcessNumber = 10;
	static const int s_defaultClientTimeOut = 60 * 20; // default unit is second.
	static const int s_defaultCallTimeOut = 50;
	static const int s_defaultMaxTotalCallTime = 36000;
	static const int s_defaultMaxOneCallTime = 3600;

};
